"""if you wish to change voice settings they can be found in either
~/speech-dispatcher/conf/speechd.conf
or
/etc/speech-dispatcher/speechd.conf
If you are installing speech-dispatcher don't forget it's python library, python-speechd, but it may be different on some distros.
If you need to set up speech-dispatcher the quickest way is to run spd-conf in terminal."""
import speechd

client = None

def init_speech():
    global client
    client = speechd.SSIPClient("pyngpong", "default")

#speaks the current message.
#will interupt speech if next message is requested while talking unless False is passed
def speak(message, interrupt=True):
    if interrupt == True: client.stop()
    client.speak(message)
